namespace NetMVC.Web.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class DramaItems : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.DramaItems",
                c => new
                    {
                        id = c.Int(nullable: false, identity: true),
                        name = c.String(),
                        set = c.String(),
                        note = c.String(),
                        Drama_id = c.Int(),
                    })
                .PrimaryKey(t => t.id)
                .ForeignKey("dbo.Dramata", t => t.Drama_id)
                .Index(t => t.Drama_id);
            
        }
        
        public override void Down()
        {
            DropForeignKey("dbo.DramaItems", "Drama_id", "dbo.Dramata");
            DropIndex("dbo.DramaItems", new[] { "Drama_id" });
            DropTable("dbo.DramaItems");
        }
    }
}
